package com.wentao.mall.model.dto;

import lombok.Data;

import javax.validation.constraints.*;

@Data
public class AddProductRequest {
    @NotBlank(message = "产品名称不为空")
    private String name;
    @NotNull(message = "类别id不能为空")
    private Integer categoryId;
    @NotNull(message = "价格不能为空")
    private Integer price;
    @NotNull(message = "库存不能为空")
    @Max(1000)
    @Min(1)
    private Integer stock;
    @NotBlank(message = "产品详细不能为null")
    private String detail;
    @NotBlank(message = "图片路径不能为null")
    private String image;
}
